/*
 * CFJ-3000 - Phone system.
 *
 * (c) 2007 Cleiber Marques
 * (c) 2007 Filipe Medeiros
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version
 * 2 of the License, or (at your option) any later version.
 *
 */

#ifndef _CFJ_H_

#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <pthread.h>
#include <linux/kd.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/soundcard.h>
#include <readline/readline.h>
#include <readline/history.h>
		  
/* include all headers from program components */

#include "soundcard.h" 
#include "terminal.h" 
#include "sockets.h"
#include "ring.h"

#define TRUE 1
#define FALSE !TRUE
#define CFJ_VERSION "0.01"
#define QLEN 5
#define BUSY 0
#define ENQ_WAIT 0
#define ENQ_ACK 1
#define ENQ_NACK 2

struct sockaddr_in my_addr;    /* struct for address IP */
struct sockaddr_in their_addr; /* connector's address information */
char their_ip[16];
u_char server_status;
u_char client_status;
u_char enq_status;
int sockfd_client, sockfd_server, sockfd_udp; /* socket descriptor  */  

int audiofd; /* audio descriptor  */ 
u_char audio_buffer_td[AUDIO_BUFF_SIZE];
u_char audio_buffer_rd[AUDIO_BUFF_SIZE];

#endif



